package com.victor.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.victor.dao.TxtDao;
import com.victor.entity.txt.BgIntroduction;
import com.victor.entity.txt.PrizesSetList;
import com.victor.entity.txt.PrizesSetMsg;
import com.victor.entity.txt.Selection;
import com.victor.service.TxtService;

@Service
public class TxtServiceImpl implements TxtService {

	@Autowired
	private TxtDao txtDao;

	// 获取 背景介绍和远景展望
	@Override
	public BgIntroduction getBgIntroduction() {
		return txtDao.getBgIntroduction();
	}

	// 修改 背景介绍和远景展望
	@Override
	public boolean updBgIntroduction(BgIntroduction bgIntroduction) {
		return txtDao.updBgIntroduction(bgIntroduction) > 0 ? true : false;
	}

	// 获取奖项设置页面信息
	@Override
	public PrizesSetMsg getPrizesSetMsg() {
		return txtDao.getPrizesSetMsg();
	}

	// 获取奖项设置列表
	@Override
	public List<PrizesSetList> getPrizesSetList() {
		return txtDao.getPrizesSetList();
	}

	// 修改奖项设置信息
	@Override
	public boolean updPrizesSetMsg(PrizesSetMsg prizesSetMsg) {
		return txtDao.updPrizesSetMsg(prizesSetMsg) > 0 ? true : false;
	}

	// 修改奖项列表
	@Override
	public boolean updPrizesSetList(PrizesSetList prizesSetList) {
		return txtDao.updPrizesSetList(prizesSetList) > 0 ? true : false;
	}

	// 添加奖项设置
	@Override
	public boolean addPrizesSet(PrizesSetList prizesSet) {
		return txtDao.addPrizesSet(prizesSet) > 0 ? true : false;
	}

	// 批删奖项设置
	@Override
	public boolean batchDelPrizesSet(int[] ids) {
		return txtDao.batchDelPrizesSet(ids) > 0 ? true : false;
	}

	// 获取评选方法及步骤
	@Override
	public List<Selection> getSelectionList() {
		return txtDao.getSelectionList();
	}

	// 修改评选方法或步骤
	@Override
	public boolean updSelection(Selection selection) {
		return txtDao.updSelection(selection) > 0 ? true : false;
	}
}
